38_Integrating MCU Into Final Circuit

The MCU used for the device (dsPIC33EP512GM310) had not yet been included in circuit designs.  Following standard application layouts advised by the MCU’s data sheet, the circuit in Figure 1 was created.    All the MCU’s power pins are connected to the 3.3V regulator and GND.  Additionally, bus lines were added connecting 10 PWM pins and 10 ON/OFF directional pins to the motor controller IC's, 10 ADC pins to the current monitoring IC’s, and 10 GPIO pins to the encoders affixed on the motors (may end up using 20 GPIO pins since each encoder provides 2 output pulses for direction indication).  A header connected to the MCU’s programming pins has also been placed in the schematicso that the Pickit 3 can be connected in the circuit after it’s built.  The circuit components on the left side of the image are user input switches which will allow a user to override the device’s AI if necessary in order to release the motor tension, lock device position, or extend device position. 
Figure 1:  MCU Circuit Including Input Switches, Basic MCU Layout, and Bus Lines To Motors


The motor controller circuit had been built before Christmas Break but has not been included in notes yet (Figure 2).  The circuit shown drives and provides feedback for two motors.  The same circuit is duplicated five times for the ten motors.  The inverters, AND’s, and H-Bridges control the motors’ speed and direction using PWM and ON/OFF signals from the MCU.  The shunt resistor drops a small voltage depending on how much current the motors are drawing and the amplifiers will pre-amplify the voltage before it reaches the MCU to be read.
Figure 2: Motor Controller Circuit for DC Motor Pair



The current overall circuit is shown in Figure 3.  Footprints have been created for all of the peripheral components and IC’s, but we will most likely need to use smaller connectors in place of any headers shown in the schematic.  
Figure 3: Full Circuit For Electrical Control System